package com.back.end.enums;

/**
 * @author HT
 * @Feature 状态码枚举
 */
public enum ResultCode {
    SUCCESS(200, "操作成功"),
    //Web
    LOGIN_ERROR(201, "账号或密码错误"),
    NAME_ERROR(301, "名称已存在"),
    TOKEN_NOT_EXIT(302, "请先登录"),
    //APP
    USER_EXITED(401, "注册用户已存在"),
    USER_ERROR(402, "用户不存在"),
    PASSWORD_ERROR(403, "密码错误"),
    ACCESS_TOKEN_NOT_EXIT(405, "请先登录或注册"),
    SAFE_CODE_OVER_DATE(406, "验证码已过期"),
    SAFE_CODE_ERROR(407, "验证码错误"),
    CUSTOMIZE(500, ""), //自定义错误
    ;

    private int code;

    private String message;

    ResultCode() {
    }

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }


    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
